package cn.com.xy.sms.sdk.util;

import java.util.ArrayList;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONException;

public class XyJSONArray extends JSONArray {

    public XyJSONArray(JSONArray jarray) throws JSONException {
        super(jarray.toString());
    }

    public List<Object> getList() {
        List<Object> valueList = new ArrayList<Object>();
        for (int i = 0; i < length(); i++) {            
            valueList.add(XyJSONObject.unwrap(opt(i)));
        }

        return valueList;
    }
}
